package net.chenlin.dp.modules.newBusiness.dao;

import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import net.chenlin.dp.modules.newBusiness.entity.po.DeviceUsersDataPo;
import net.chenlin.dp.modules.newBusiness.entity.po.DistrictTopologyPo;
import net.chenlin.dp.modules.newBusiness.entity.po.NewDistrictPo;
import net.chenlin.dp.modules.newBusiness.entity.po.NewExcelmportDataPo;
import net.chenlin.dp.modules.newBusiness.entity.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: Yansgm
 * @Description:
 * @Date: 2025-04-01 17:52:05
 */
@Mapper
public interface NewDistrictManageMapper {

    List<NewDistrictListVo> getNewDistrictList(Page<NewDistrictListVo> page, Query query);

    void insetDistrict(NewDistrictPo districtPo);

    void updateDistrict(NewDistrictPo districtPo);

    void insertTopologyNode(DistrictTopologyPo po);

    List<TopologyNodeTreeVo> getTopologyNodeId(@Param("districtId")  Integer districtId,@Param("isqueryDevcie")  Integer isqueryDevcie);

    void updateNodeParentId(@Param("nodeParentId")  Integer nodeParentId, @Param("nodeId")  Integer nodeId);

    void editTopologyNode(DistrictTopologyPo po);

    List<TopologyNodeVo> getNextTopologNode(Integer nodeId);

    void deleteTopologyNode(Integer nodeId);

    TopologyNodeVo getTopologyNode(Integer nodeId);

    List<TopologyListVo> getTopologyList(Integer districtId);

    NewDistrictVo getDistrictInfo(Integer id);

    List<String> getAllDevice(Integer districtId);

    BigDecimal getDeviceElectricity(String deviceNo);

    TopologyNodeVo getTopologNodeByName(String nodeName);

    Integer getOffLinenNum(Integer districtId);

    List<NewDistrictVo> getAllDistrict(@Param("name") String name);

    void insertDeviceUsersData(List<DeviceUsersDataPo> list);

    List<DeviceUsersDataVo> getDeviceUserList(Page<DeviceUsersDataVo> page, Query query);

    TopologyNodeVo getOnlineNodeByName(String nodeName);

    void deleteDistrict(Integer districtId);

    void deleteDistrictNode(Integer districtId);

    Integer getDistrictOnline(Integer districtId);

    void batchInsertData(List<NewExcelmportDataPo> list);
}
